package a07;

import org.springframework.beans.factory.DisposableBean;

import javax.annotation.PreDestroy;

public class Bean02 implements DisposableBean {
    @Override
    public void destroy() throws Exception {
        System.out.println("DisposableBean接口的destroy");
    }

    @PreDestroy
    public void destroy1(){
        System.out.println("@PreDestroy注解");
    }

    public void destroy2() {
        System.out.println("@Bean");
    }
}
